import useRequest from '@/utils/request'

const request = useRequest({})
// 查询公告列表
export function listNotice(query: any) {
  return request.get('/cj-user/sys/notice/list', {
    params: query,
  })
}

// 查询公告详细
export function getNotice(noticeId: any) {
  return request.get('/cj-user/sys/notice/details/' + noticeId)
}

// 新增公告
export function addNotice(data: any) {
  return request.post('/cj-user/sys/notice/add', data)
}

// 修改公告
export function updateNotice(data: any) {
  return request.post('/cj-user/sys/notice/edit', data)
}

// 删除公告
export function delNotice(noticeIds: any) {
  return request.post('/cj-user/sys/notice/del/' + noticeIds)
}
